<?php
/* SVN FILE: $Id: core.php 2951 2006-05-25 22:12:33Z phpnut $ */
/**
 * This is core configuration file.
 *
 * Use it to configure core behaviour ofCake.
 *
 * PHP versions 4 and 5
 *
 * CakePHP :  Rapid Development Framework <http://www.cakephp.org/>
 * Copyright (c)	2006, Cake Software Foundation, Inc.
 *								1785 E. Sahara Avenue, Suite 490-204
 *								Las Vegas, Nevada 89104
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright		Copyright (c) 2006, Cake Software Foundation, Inc.
 * @link				http://www.cakefoundation.org/projects/info/cakephp CakePHP Project
 * @package			cake
 * @subpackage		cake.app.config
 * @since			CakePHP v 0.2.9
 * @version			$Revision: 2951 $
 * @modifiedby		$LastChangedBy: phpnut $
 * @lastmodified	$Date: 2006-05-25 17:12:33 -0500 (Thu, 25 May 2006) $
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 * If you do not have mod rewrite on your system
 * or if you prefer to use CakePHP pretty urls.
 * uncomment the line below.
 * Note: If you do have mod rewrite but prefer the
 * CakePHP pretty urls, you also have to remove the
 * .htaccess files
 * release/.htaccess
 * release/app/.htaccess
 * release/app/webroot/.htaccess
 */
//	define ('BASE_URL', env('SCRIPT_NAME'));
/**
 * Set debug level here:
 * - 0: production
 * - 1: development
 * - 2: full debug with sql
 * - 3: full debug with sql and dump of the current object
 *
 * In production, the "flash messages" redirect after a time interval.
 * With the other debug levels you get to click the "flash message" to continue.
 *
 */
 
 //I've set the debug level in webroot/index.php, because we're checking the environment
 //for testing purposes.
	Configure::write('App.encoding', 'UTF-8');
/**
 * Turn of caching checking wide.
 * You must still use the controller var cacheAction inside you controller class.
 * You can either set it controller wide, or in each controller method.
 * use var $cacheAction = true; or in the controller method $this->cacheAction = true;
 */
 
	Configure::write('Cache.check', true);
/**
 * Error constant. Used for differentiating error logging and debugging.
 * Currently PHP supports LOG_DEBUG
 */
	define('LOG_ERROR', 2);
/**
 * The preferred session handling method. Valid values:
 *
 * 'php'	 		Uses settings defined in your php.ini.
 * 'cake'		Saves session files in CakePHP's /tmp directory.
 * 'database'	Uses CakePHP's database sessions.
 *
 * To define a custom session handler, save it at /app/config/<name>.php.
 * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
 *
 * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
 *
 */
	Configure::write('Session.save', 'php');
/**
 * The name of the table used to store CakePHP database sessions.
 *
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 *
 * The table name set here should *not* include any table prefix defined elsewhere.
 */
	//Configure::write('Session.table', 'cake_sessions');
/**
 * The DATABASE_CONFIG::$var to use for database session handling.
 *
 * 'Session.save' must be set to 'database' in order to utilize this constant.
 */
	//Configure::write('Session.database', 'default');
/**
 * The name of CakePHP's session cookie.
 */
	Configure::write('Session.cookie', 'CAKEPHP');
/**
 * Session time out time (in seconds).
 * Actual value depends on 'Security.level' setting.
 */
	Configure::write('Session.timeout', '120');
/**
 * If set to false, sessions are not automatically started.
 */
	Configure::write('Session.start', true);
/**
 * When set to false, HTTP_USER_AGENT will not be checked
 * in the session
 */
	Configure::write('Session.checkAgent', true);
/**
 * The level of CakePHP security. The session timeout time defined
 * in 'Session.timeout' is multiplied according to the settings here.
 * Valid values:
 *
 * 'high'	Session timeout in 'Session.timeout' x 10
 * 'medium'	Session timeout in 'Session.timeout' x 100
 * 'low'		Session timeout in 'Session.timeout' x 300
 *
 * CakePHP session IDs are also regenerated between requests if
 * 'Security.level' is set to 'high'.
 */
	Configure::write('Security.level', 'medium');
/**
 * A random string used in security hashing methods.
 */
	Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
/**
 * Uncomment the define below to use cake built in admin routes.
 * You can set this value to anything you want.
 * All methods related to the admin route should be prefixed with the
 * name you set CAKE_ADMIN to.
 * For example: admin_index, admin_edit
 */
//	define('CAKE_ADMIN', 'admin');
/**
 *  The define below is used to turn cake built webservices
 *  on or off. Default setting is off.
 */
	//define('WEBSERVICES', 'off');
/**
 * Compress output CSS (removing comments, whitespace, repeating tags etc.)
 * This requires a/var/cache directory to be writable by the web server (caching).
 * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use Controller::cssTag().
 */
	//define('COMPRESS_CSS', false);
/**
 * If set to true, helpers would output data instead of returning it.
 */
	//define('AUTO_OUTPUT', false);
/**
 * If set to false, session would not automatically be started.
 */
	//define('AUTO_SESSION', true);
/**
 * Set the max size of file to use md5() .
 */
	//define('MAX_MD5SIZE', (5 * 1024) * 1024);
/**
 * To use Access Control Lists with Cake...
 */
	//define('ACL_CLASSNAME', 'DB_ACL');
	//define('ACL_FILENAME', 'dbacl' . DS . 'db_acl');
	
	Cache::config('default', array('engine' => 'File'));
	
	if (!defined('AUTH_ADMIN')) {
	  define('AUTH_ADMIN','administrator');
	  define('AUTH_PROD','producer');
	  define('AUTH_MEM','member');
	  define('AUTH_RTE','rtemanager');
	  define('AUTH_CASH','cashier');
	}
	
/**
 * Surcharge Rates
 */
 	define('MEMB_SURCHARGE', 2);
	define('PROD_SURCHARGE', 2);
	
	define('SITE_NAME', "West Michigan Co-op");
	
	Configure::write('site_name', 'West Michigan Co-op');
	Configure::write('abbreviated_site_name', "WMCo-op");
	Configure::write('phone_number', '(616) 248-2936');
	Configure::write('Membership.trial_period', '2 months');
	Configure::write('Membership.ask_for_fee', '1 month');
	Configure::write('Membership.valid_for', '1 year');
	
	Configure::write('Email.smtp_options', array(
				'host'=>'localhost',
				'port'=>'25',
				'timeout' => '30', 
				'username' => 'mailer+westmichigancoop.com',
				'password'	=> 'coopmail456'
			));
	Configure::write('Email.from', "West Michigan Co-Op <mailer@westmichigancoop.com>");
	Configure::write('Email.replyTo', "West Michigan Co-Op <questions@westmichigancoop.com>");
	
	Configure::write('Blog.rss', 'http://wmcoop.blogspot.com/feeds/posts/default?alt=rss');
	
	Configure::write('Invoice.double_side', true);
	Configure::write('Invoice.header', "<b><i><c:gray>O u r</c:gray></i>   O n l i n e   F a r m e r ' s   M a r k e t</b>");
	Configure::write('Invoice.footer', "<b><i><c:clr:gray>w w w .</c:clr> w e s t m i c h i g a n c o o p <c:gray>. c o m</c:gray></i></b>");
	
	if (!defined('SALES_TAX')) {
	  define('SALES_TAX',.06); // set tax to your state's sales tax percentage
	}
	if (!defined('NUM_CASHIERS')) {
	  define('NUM_CASHIERS', 5);
	}
?>